]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Consider additions for separator visibility
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 9 Feb 2021 20:48:39 +0000 (21:48 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 10 Feb 2021 09:09:34 +0000 (09:09 +0000)
The children variable holds the icons that were originally in
the dash. For the separator visibility, we should consider the
icons that are in the dash after the update, so we must consider
additions as well as removals.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1659>

js/ui/dash.js

index 16893f9765d2dff8dbfc04b6f02083f41864326b..6b4c114e7966b3752b33c8448d2830aa8aa72f9b 100644 (file)
@@ -745,7 +745,7 @@ var Dash = GObject.registerClass({
 
         // Update separator
         const nFavorites = Object.keys(favorites).length;
-        const nIcons = children.length - removedActors.length;
+        const nIcons = children.length + addedItems.length - removedActors.length;
         if (nFavorites > 0 && nFavorites < nIcons) {
             if (!this._separator) {
                 this._separator = new St.Widget({